package com.yonyou.brigade.order_center.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.service.IService;
import com.yonyou.brigade.order_center.model.InvoiceRelationship;

import java.util.List;

/**
 * <p>
 * 发票订单关联表 服务类
 * </p>
 *
 * @author houyb
 * @since 2020-03-03
 */
public interface IInvoiceRelationshipService extends IService<InvoiceRelationship> {


    /**
     * 匹配发票和订单
     * @param tenantId
     * @param matchData
     * @param userId
     * @return
     */
    JSONObject invoiceMatchOrder(String tenantId, String userId, JSONObject matchData);

    /**
     * 手动关联或取消关联票据和订单
     * @param action
     * @param invoicesBrigades
     * @return
     */
    boolean manualMatching(String action, JSONArray invoicesBrigades);

    List<InvoiceRelationship> getRelationshipsByOrderNo(String orderNo);

}
